package contacts.po;

import java.sql.Date;



/**
 * Student的pojo类
 * @author 梁宇ling
 *
 */
public class Student implements  Comparable<Object>{
	private int id;
	private  String sNumber;
	private String sName;
	private Date birthday;
	private String tel;
	private String email;
	private String houseAddress;
	//private int sRoomNo;//外键
	//private String roomName;
	private Room room;
	
	
	
	public Student() {
		super();
	}
	
	public Student(int id, String sNumber, String sName, Date birthday, String tel, String email, String houseAddress,
			Room room) {
//		, String roomName
		super();
		this.id = id;
		this.sNumber = sNumber;
		this.sName = sName;
		this.birthday = birthday;
		this.tel = tel;
		this.email = email;
		this.houseAddress = houseAddress;
		this.room = room;
		//this.roomName = roomName;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getsNumber() {
		return sNumber;
	}

	public void setsNumber(String sNumber) {
		this.sNumber = sNumber;
	}

	public String getsName() {
		return sName;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getHouseAddress() {
		return houseAddress;
	}

	public void setHouseAddress(String houseAddress) {
		this.houseAddress = houseAddress;
	}

	public Room getRoom() {
		return room;
	}

	public void setRoom(Room room) {
		this.room = room;
	}

//	public String getRoomName() {
//		return roomName;
//	}
//
//	public void setRoomName(String roomName) {
//		this.roomName = roomName;
//	}
	@Override
	public String toString() {
		return "Student [id=" + id + ", sNumber=" + sNumber + ", sName=" + sName + ", birthday=" + birthday + ", tel="
				+ tel + ", email=" + email + ", houseAddress=" + houseAddress + ", room=" + room + "]";
	}

	@Override
	public int compareTo(Object object) {
		Student stu= (Student) object;
		int difference = (int) ((this.getId()- stu.getId()) * 10000);
		return difference;
	}

	
	
	

	
}
